<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('检查记录录入')" />
    </head>
    <style type="text/css">
        #febs-hazardExamineRecord {

        }
    </style>
    <body class="febs-container" id="febs-hazardExamineRecord">
        <div class="febs-body layui-fluid"  lay-title="检查记录录入" >
            <div class="febs-body-search">
                <form class="jhg-body layui-form layui-table-form" lay-filter="hazardExamineRecord-table-form" id="hazardExamineRecord-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" th:if="${hasHeadCompanyRole }">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline" style="width:240px;">
                                        <select name="tenantSelect" id="tenantSelect" lay-search="" >
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${currentTenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">检查编号</label>
                                    <div class="layui-input-inline" >
                                        <input type="text" name="examineNo" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">检查标题</label>
                                    <div class="layui-input-inline" >
                                        <input type="text" name="examineTitle" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">检查类型</label>
                                    <div class="layui-input-inline" style="width: 240px;">
                                        <select name="examineType" id="examineType" lay-search="" >
                                            <option value="">请选择</option>
                                            <option value="1">公司检查</option>
                                            <option value="2">部门检查</option>
                                            <option value="3">车间检查</option>
                                            <option value="4">班组检查</option>
                                            <option value="5">项目检查</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="febs-table-full">
                <table lay-filter="hazardExamineRecordTable"  lay-data="{id: 'hazardExamineRecordTable'}"></table>
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="hazardExamineRecord-tool">
            <span shiro:lacksPermission="hazardExamineRecord:add,hazardExamineRecord:edit,hazardExamineRecord:delete">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
             </span>

<!--            检查发布hazard_examine——status      状态;1：待发布 2：待检查 3：进行中 4：已结束-->
            {{# if(d.examineStatus!='4'){ }}
                {{# if(d.examineRecordId && d.status=='1'){  }}
                <button type="button" lay-event="edit" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-orange"
                        shiro:hasPermission="hazardExamineRecord:edit">
                    <em class="layui-icon layui-icon-edit"></em>编辑
                </button>
                <!--                    <a lay-event="del" shiro:hasPermission="hazardExamineRecord:delete"><em class="layui-icon febs-edit-area febs-red">&#xe7f9;</em></a>-->
                {{# } else {  }}
                    <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange layui-btn-disabled"
                            shiro:hasPermission="hazardExamineRecord:edit">
                        <em class="layui-icon layui-icon-edit"></em>编辑
                    </button>
                {{# }  }}

<!--            最新一条检查项内容行可以新增检查项内容按钮-->
                {{# if(d.recordSort=='1'){  }}
                    <button type="button" lay-event="addRecord" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-green"
                            shiro:hasPermission="hazardExamineRecord:add">
                        <em th:title="新增检查项内容"  class="layui-icon layui-icon-file-add"></em>新增
                    </button>
                {{# }  }}


            {{# }else{  }}
                - -
            {{# }  }}

        </script>

        <script data-th-inline="javascript" >
            currentTenantId = [[${tenantId}]],
            hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
        </script>
        <script th:src="@{/febs/js/hazard/hazardExamineRecord/hazardExamineRecordList.js(v=1)}"></script>
    </body>
</html>